package org.jeecg.modules.wlhy.bill.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: hy_bill
 * @Author: jeecg-boot
 * @Date:   2022-10-28
 * @Version: V1.0
 */
@Data
@TableName("hy_bill")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="hy_bill对象", description="hy_bill")
public class HyBill implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;

    @Excel(name = "订单类型", width = 15,dicCode = "billType")
    @Dict(dicCode = "billType")
    @ApiModelProperty(value = "单据类型(1支付运费、尾款  6预付运费 7分段预付运费   8支付计划首付 9支付计划到付) ")
    private String billType;
	/**运单id*/
    @Excel(name = "运单", width = 15, dictTable = "hy_shipping_note", dicText = "shipping_note_number", dicCode = "id")
    @Dict(dictTable = "hy_shipping_note", dicText = "shipping_note_number", dicCode = "id")
    @ApiModelProperty(value = "运单id")
    private String shippingId;

    @Excel(name = "货主", width = 15, dictTable = "hy_customer", dicText = "customer_name", dicCode = "id")
    @Dict(dictTable = "hy_customer", dicText = "customer_name", dicCode = "id")
    @ApiModelProperty(value = "所属货主")
    private String customerId;

	/**customerBillId*/
    @ApiModelProperty(value = "customerBillId")
    private String customerBillId;
	/**shippingBillId*/
    @ApiModelProperty(value = "shippingBillId")
    private String shippingBillId;
	/**driverBillId*/
    @ApiModelProperty(value = "driverBillId")
    private String driverBillId;
	/**carrierBillId*/
    @ApiModelProperty(value = "carrierBillId")
    private String carrierBillId;

	/**运单状态(0待接单 1已接单 2装货中 3运输中 4已交货 5已签收 8已作废)*/
    @Excel(name = "运单状态", width = 15, dicCode = "shipping_status")
    @Dict(dicCode = "shipping_status")
    @ApiModelProperty(value = "运单状态(0待接单 1已接单 2装货中 3运输中 4已交货 5已签收  8已作废)")
    private String shippingStatus;
	/**支付渠道*/
    @Excel(name = "支付渠道", width = 15, dicCode = "pay_channel")
    @ApiModelProperty(value = "支付渠道(1农行支付2中信银行 5线下支付6浦发)")
    @Dict(dicCode = "pay_channel")
    private String payChannel;

	@Excel(name = "支付源", width = 15, dicCode = "billPaySource")
    @ApiModelProperty(value = "支付源(1账户余额 2平台垫付 3经纪人垫付 4账期)")
    @Dict(dicCode = "billPaySource")
    private String paySource;

	/**运单结算状态(0未对账 1申请对账 2对账完成 3待审核 4审核完成 5提交支付6已支付7支付失败  8审核驳回)*/
    @Excel(name = "支付状态", width = 15, dicCode = "shipping_pay_status")
    @Dict(dicCode = "shipping_pay_status")
    @ApiModelProperty(value = "支付结算状态(0未对账 1申请对账 2对账完成 3待审核 4审核完成 5提交支付6已支付7支付失败  8审核驳回)")
    private String payStatus;

    /**运费支付时间*/
    @Excel(name = "运费支付时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "运费支付时间")
    private Date payDt;

    @Excel(name = "付款人", width = 15)
    @ApiModelProperty(value = "付款人")
    private String fkr;

    @ApiModelProperty(value = "是否车队长代收(0否1是)")
    private String izCarrierPay;

	/**金额*/
//	@Excel(name = "金额", width = 15)
    @ApiModelProperty(value = "运费金额")
    private BigDecimal amt;
    @Excel(name = "货主运费", width = 15)
    @ApiModelProperty(value = "货主运费")
    private BigDecimal customerAmt;
    @Excel(name = "司机运费", width = 15)
    @ApiModelProperty(value = "司机运费")
    private BigDecimal driverAmt;
    @Excel(name = "车队长运费", width = 15)
    @ApiModelProperty(value = "车队长运费")
    private BigDecimal carrierAmt;

/*    @ApiModelProperty(value = "经纪人运费")
    private BigDecimal agentAmt;*/

	/**支付状态(1开始支付8)*/
//	@Excel(name = "支付状态", width = 15)
    @ApiModelProperty(value = "支付状态(1开始支付8)")
    private String billPayStatus;
	/**支付状态结果说明*/
//	@Excel(name = "支付状态结果说明", width = 15)
    @ApiModelProperty(value = "支付状态结果说明")
    private String billPayRemark;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**删除状态(0-正常,1-已删除)*/
    @ApiModelProperty(value = "删除状态(0-正常,1-已删除)")
    @TableLogic
    private String delFlag;

    @Dict(dictTable = "hy_customer", dicText = "customer_name", dicCode = "id")
    @ApiModelProperty(value = "经纪人")
    private String agentId;

    @ApiModelProperty(value = "垫付id")
    private String dfId;

    @ApiModelProperty(value = "钱包支出记录id")
    private String payRecordId;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "审核时间")
    private Date autDt;

    @Excel(name = "审核人", width = 15)
    @ApiModelProperty(value = "审核人")
    private String autUser;
    @ApiModelProperty(value = "是否是承运商运单(0否1是)")
    private String izCaptainShipping;
    @ApiModelProperty(value = "承运商运费")
    private BigDecimal captainFee;
    @Dict(dictTable = "hy_captain", dicText = "captain_name", dicCode = "id")
    private String captainId;
}
